# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
pkgname=boa-cli
pkgver=0.17.3
pkgrel=0
pkgdesc="Embeddable and experimental Javascript engine written in Rust"
url="https://github.com/boa-dev/boa/"
# 32-bit: failing tests
# s390x/riscv64: nix crate
arch="all !armhf !armv7 !x86 !riscv64 !s390x"
license="MIT OR Unlicense"
makedepends="cargo cargo-auditable"
source="https://github.com/boa-dev/boa/archive/refs/tags/v$pkgver/boa-$pkgver.tar.gz"
builddir="$srcdir/boa-$pkgver"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --package boa_cli --release --frozen --bin boa
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/boa "$pkgdir"/usr/bin/boa
}

sha512sums="
ec2f4976580aaa3589b0ff4047924ea07fc836bbce0529d6d879b4bce18c8464f74a620123b932865eb103e7ac84d5cf78594f54fea205ee5024728d78a94192  boa-0.17.3.tar.gz
"
